package com.lyl.auth;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class MvcConfig implements WebMvcConfigurer {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        //自定义的登陆页面
        registry.addViewController("/login").setViewName("login");

        registry.addViewController("/oauth/oauth_approval").setViewName("oauth_approval"); //自定义的授权页面

        registry.addViewController("/oauth/oauth_error").setViewName("oauth_error"); //自定义的授权页面
    }
}
